Matthias Clasen [Tue, 2 Jun 2020 03:12:01 +0000 (23:12 -0400)]
Cosmetic improvements to the filebrowser demo
Make it look good.
Matthias Clasen [Tue, 2 Jun 2020 00:07:45 +0000 (00:07 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
print backend: Fix list model handling in dispose
See merge request GNOME/gtk!2013
Matthias Clasen [Mon, 1 Jun 2020 22:48:26 +0000 (22:48 +0000)]
Merge branch 'ebassi/expression-type' into 'master'
Ebassi/expression type
See merge request GNOME/gtk!2014
Matej Urbančič [Mon, 1 Jun 2020 20:19:55 +0000 (22:19 +0200)]
Added Slovenian translation
Emmanuele Bassi [Mon, 1 Jun 2020 20:17:34 +0000 (21:17 +0100)]
Document how to define properties using GtkExpression
Use the GtkParamSpecExpression type to describe the property, and the
GValue API to set and get the expression instance.
Emmanuele Bassi [Mon, 1 Jun 2020 20:07:53 +0000 (21:07 +0100)]
Turn GtkExpression into a GTypeInstance
Since it's a type with sub-classes, we need to use GTypeInstance (at the
very least), otherwise we won't be able to address each sub-class as
such.
This is similar to how GskRenderNode and GdkEvent are handled, with the
added difficulty that GtkExpression is meant to be used in properties,
in order to be deserialised by GtkBuilder. This requires adding a
GParamSpec sub-class that we can match on from within GtkBuilder,
alongside some convenience API for storing a GtkExpression inside a
GValue.
Emmanuele Bassi [Mon, 1 Jun 2020 20:06:04 +0000 (21:06 +0100)]
Print out the file name we're testing
We're printing out the file we're testing once we succeed, but it's hard
to know which file caused a failure. Let's add a g_test_message()
directive so we can look in our logs.
Matthias Clasen [Mon, 1 Jun 2020 19:16:02 +0000 (15:16 -0400)]
gtk-demo: Plug a leak
We were leaking a reference to the settings demo.
This showed up as gtk4-demo --run listview_settings
not exiting when the window is closed.
Matthias Clasen [Mon, 1 Jun 2020 18:45:01 +0000 (14:45 -0400)]
columnviewcolumn: Fix visibility implementation
We were not properly syncing initial visibility
with widgets.
Matthias Clasen [Mon, 1 Jun 2020 17:50:19 +0000 (13:50 -0400)]
Add a test for the previous fix
This checks that action muxer hierarchy is properly
updated when muxers appear in the middle.
Matthias Clasen [Mon, 1 Jun 2020 17:49:26 +0000 (13:49 -0400)]
Update action muxer hierarchy propertly
When a new muxer appears, we must not only make it
inherit from the parent, we also have to update all
children to inherit from it.
Matthias Clasen [Mon, 1 Jun 2020 11:43:54 +0000 (07:43 -0400)]
print backend: Fix list model handling in dispose
The print backends do some complicated dispose handling
where the implementations call gtk_print_backend_destroy().
Our tests (in particular, the templates test) trigger
situations where we use print backends after dispose,
and they can't handle the printers listmodel being
NULL at that time. So just remove the printers in
dispose, keep the empty liststore until finalize.
Kukuh Syafaat [Mon, 1 Jun 2020 13:29:20 +0000 (13:29 +0000)]
Update Indonesian translation
Matthias Clasen [Mon, 1 Jun 2020 12:26:15 +0000 (12:26 +0000)]
Merge branch 'gtk-demo-run-no-main-window' into 'master'
gtk-demo: Don't show main window if --run is passed in
See merge request GNOME/gtk!1979
Matthias Clasen [Mon, 1 Jun 2020 12:25:20 +0000 (12:25 +0000)]
Merge branch 'fix-frameclock-going-backwards' into 'master'
Fix frameclock going backwards
See merge request GNOME/gtk!2011
Matthias Clasen [Mon, 1 Jun 2020 11:28:28 +0000 (11:28 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
columnview: Add column reordering
See merge request GNOME/gtk!2005
Emmanuele Bassi [Mon, 1 Jun 2020 10:32:55 +0000 (10:32 +0000)]
Merge branch 'ebassi/scroll-position' into 'master'
Remove position from GdkScrollEvent
See merge request GNOME/gtk!2012
Emmanuele Bassi [Mon, 1 Jun 2020 09:49:33 +0000 (10:49 +0100)]
Remove position from GdkScrollEvent
Scroll events do not have a position, so they shouldn't implement the
GdkEventClass.get_position() virtual function; nor they should have an x
and y fields that never get updated.
Alexander Larsson [Mon, 1 Jun 2020 08:53:24 +0000 (10:53 +0200)]
Fix frameclock going backwards
When we run the frameclock RUN_FLUSH_IDLE idle before the paint,
then gdk_frame_clock_flush_idle() sets
```
priv->phase = GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT
```
at the end if there is a paint comming.
But, before doing the paint cycle it may handle other X events, and
during that time the phase is set to BEFORE_PAINT. This means that the
current check on whether we're inside a paint is wrong:
```
if (priv->phase != GDK_FRAME_CLOCK_PHASE_NONE &&
priv->phase != GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS)
return priv->smoothed_frame_time_base;
```
This caused us to sometimes use this smoothed_frame_time_base even
though we previously reported a later value during PHASE_NONE, thus
being non-monotonic.
We can't just additionally check for the BEGIN_PAINT phase though,
becasue if we are in the paint loop actually doing that phase we
should use the time base. Instead we check for `!(BEFORE_PAINT &&
in_paint_idle)`.
Matthias Clasen [Mon, 1 Jun 2020 04:10:42 +0000 (00:10 -0400)]
gtk-demo: Fix a crash in the puzzle
Avoid a crash when clicking the refresh button
after solving the puzzle.
Matthias Clasen [Mon, 1 Jun 2020 04:09:52 +0000 (00:09 -0400)]
gtk-demo: Fix keynav in the puzzle
We need to make shortcut controller have global
scope, otherwise the shortcuts lose against the
window keybindings.
Matthias Clasen [Mon, 1 Jun 2020 03:42:36 +0000 (23:42 -0400)]
gtk-demo: Flesh out the settings demo
Add columns for type and default value.
Matthias Clasen [Wed, 18 Dec 2019 07:19:48 +0000 (02:19 -0500)]
columnview: Add column reordering
Add an API to allow reordering columns.
Matthias Clasen [Sun, 31 May 2020 23:32:44 +0000 (23:32 +0000)]
Merge branch 'action-tests' into 'master'
Action tests
See merge request GNOME/gtk!2003
Matthias Clasen [Sun, 31 May 2020 22:54:38 +0000 (22:54 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Add a forgotten export
See merge request GNOME/gtk!2002
Matthias Clasen [Sun, 31 May 2020 20:40:15 +0000 (16:40 -0400)]
More action tests
Test actions under hierarchy changes.
Matthias Clasen [Sun, 31 May 2020 20:47:53 +0000 (16:47 -0400)]
Add a forgotten export
gtk_column_view_sort_by was missing a GDK_AVAILABLE_IN_ALL
annotation, causing it to not be exported.
Matthias Clasen [Sun, 31 May 2020 19:36:41 +0000 (15:36 -0400)]
testsuite: Beef up action tests
Check return values from gtk_widget_activate.
Matthias Clasen [Sun, 31 May 2020 20:39:06 +0000 (20:39 +0000)]
Merge branch 'column-visible' into 'master'
columnview: Add a GtkColumnViewColumn:visible property
See merge request GNOME/gtk!1997
Emmanuele Bassi [Sun, 31 May 2020 19:12:32 +0000 (19:12 +0000)]
Merge branch 'drop-coverflow' into 'master'
Drop GtkCoverFlow for now
See merge request GNOME/gtk!2000
Yuri Chornoivan [Sun, 31 May 2020 19:05:20 +0000 (19:05 +0000)]
Update Ukrainian translation
Matthias Clasen [Sun, 31 May 2020 18:14:14 +0000 (18:14 +0000)]
Merge branch 'drop-fallback-c89' into 'master'
Drop fallback-c89.c
See merge request GNOME/gtk!1999
Matthias Clasen [Sun, 31 May 2020 18:13:36 +0000 (18:13 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!1995
Matthias Clasen [Sun, 31 May 2020 17:11:35 +0000 (13:11 -0400)]
Drop GtkCoverFlow for now
There is no agreement that a coverflow widget is
appropriate for GTK 4.
It would be ok as a demo if it could live in gtk-demo,
but that requires us to make GtkListBase public first.
The demo is also somewhat rough and needs more work
to look plausible.
Drop GtkCoverFlow and the related demo for now.
Matthias Clasen [Sun, 31 May 2020 15:02:36 +0000 (11:02 -0400)]
gtk-demo: Fixes for the sliding puzzle
We were calling check_solved only for key presses,
meaning you could never solve the puzzle with the
mouse.
Matthias Clasen [Sun, 31 May 2020 14:45:22 +0000 (10:45 -0400)]
gtk-demo: Some fixes to awards
Fix things up enough to make the list show up.
Still not a working example, but closer.
Matthias Clasen [Sun, 22 Dec 2019 23:09:07 +0000 (18:09 -0500)]
printer: Fix the default value of icon-name
Just set this to "printer", so we don't have
to fix it up in the print dialog.
Matthias Clasen [Sun, 22 Dec 2019 19:49:26 +0000 (14:49 -0500)]
printbackend: Add a list model getter
Now that we have a list model for printers,
we can start using it.
Matthias Clasen [Sun, 22 Dec 2019 19:43:48 +0000 (14:43 -0500)]
printbackend: Use a list store
Matthias Clasen [Sun, 22 Dec 2019 17:27:30 +0000 (12:27 -0500)]
gtk-demo: Add more scrolling benchmarks
Add a listview and gridview to the scrolling
benchmarks.
Emmanuele Bassi [Sun, 31 May 2020 15:18:36 +0000 (15:18 +0000)]
Merge branch 'ebassi/annotations' into 'master'
Ebassi/annotations
See merge request GNOME/gtk!1996
Christoph Reiter [Sun, 31 May 2020 14:06:07 +0000 (16:06 +0200)]
Drop fallback-c89.c
We require a C compiler supporting C99 now. The main purpose of
these fallbacks was for MSVC. From what I can see this is now all supported
by MSVC 2015+ anyway.
The only other change this includes is to replace isnanf() with the
(type infering) C99 isnan() macro, because MSVC doesn't provide isnanf().
Matthias Clasen [Mon, 16 Dec 2019 19:01:42 +0000 (14:01 -0500)]
columnviewcolumn: Add a visible property
This lets us hide columns, which is an expected
feature of columned lists.
Emmanuele Bassi [Sun, 31 May 2020 14:14:26 +0000 (15:14 +0100)]
Annotate the GtkFunctionListItemFactory constructor
But skip it, since it cannot really be used by language bindings, as it
binds the same user data to two separate functions.
Emmanuele Bassi [Sun, 31 May 2020 14:10:27 +0000 (15:10 +0100)]
Fix annotations for gtk_cclosure_expression_new()
Missing scope annotations for the various functions.
Matthias Clasen [Sun, 31 May 2020 14:06:31 +0000 (14:06 +0000)]
Merge branch 'columnview-1' into 'master'
Convert the inspector to column views
See merge request GNOME/gtk!1994
Emmanuele Bassi [Sun, 31 May 2020 14:05:59 +0000 (15:05 +0100)]
Add missing separator
An annotation is separated from the description by a ':'.
Emmanuele Bassi [Sun, 31 May 2020 14:04:51 +0000 (15:04 +0100)]
docs: Fix annotations
- Use the same name for the argument in the declaration, definition,
and documentation
- Use "optional" instead of the deprecated "allow-none"
Christoph Reiter [Sun, 31 May 2020 13:09:31 +0000 (15:09 +0200)]
fallback-c89: Try to make isnanf work
Matthias Clasen [Sun, 8 Dec 2019 17:53:46 +0000 (12:53 -0500)]
inspector: Touch up list styling
This is just the minimal amount of work to make
headers recognizable.
Matthias Clasen [Sun, 8 Dec 2019 06:09:59 +0000 (01:09 -0500)]
inspector: Use a column view for actions
A straight conversion from list box to column view.
Matthias Clasen [Sun, 8 Dec 2019 21:02:14 +0000 (16:02 -0500)]
inspector: Make the resource list sortable
This is using a GtkTreeListRowSorter to keep expanded
state of the tree while changing the sorting.
Matthias Clasen [Sun, 8 Dec 2019 03:26:35 +0000 (22:26 -0500)]
inspector: Use a column view for the resource list
A conversion from tree view to column view.
Matthias Clasen [Tue, 3 Dec 2019 02:00:22 +0000 (21:00 -0500)]
inspector: Use a column view for properties
Just a straight conversion from list box to column view.
Matthias Clasen [Wed, 18 Dec 2019 04:51:11 +0000 (23:51 -0500)]
inspector: Add columns to the object tree
Add columnview columns in the object tree.
We do the same for treeview columns.
Matthias Clasen [Sun, 31 May 2020 13:02:51 +0000 (13:02 +0000)]
Merge branch 'fix-mnemonic-zero' into 'master'
label: Fix mnemonic zero
Closes #2805
See merge request GNOME/gtk!1993
Yuri Chornoivan [Sun, 31 May 2020 06:12:49 +0000 (06:12 +0000)]
Update Ukrainian translation
Yuri Chornoivan [Sun, 31 May 2020 06:09:05 +0000 (06:09 +0000)]
Update Ukrainian translation
Matthias Clasen [Sun, 31 May 2020 05:34:18 +0000 (05:34 +0000)]
Merge branch 'dropdown-for-merge' into 'master'
Dropdown for merge
Closes #2214
See merge request GNOME/gtk!1992
Matthias Clasen [Sun, 31 May 2020 05:32:37 +0000 (05:32 +0000)]
Merge branch 'listview-for-merge' into 'master'
Listview for merge
Closes #2214
See merge request GNOME/gtk!1991
Matthias Clasen [Sun, 31 May 2020 01:40:20 +0000 (21:40 -0400)]
label: Fix mnemonic zero
We were confusing '\0' and '0' when parsing the label
for mnemonics.
Fixes: #2805
Matthias Clasen [Wed, 18 Dec 2019 22:34:38 +0000 (17:34 -0500)]
Add some tests for new GtkBuilder syntax
Some valid and invalid examples for <closure>,
<lookup> and <constant>.
Matthias Clasen [Sat, 30 May 2020 18:24:34 +0000 (14:24 -0400)]
docs: Update the list widget overview
Fill in the GtkComboBox and GtkCellView replacements
in the quick reference table.
Matthias Clasen [Sat, 14 Dec 2019 18:32:55 +0000 (13:32 -0500)]
gtk-demo: Add a large grid demo
This is similar to the flowbox demo, but much bigger.
Matthias Clasen [Sat, 14 Dec 2019 05:50:26 +0000 (00:50 -0500)]
inspector: Use dropdowns in the visual page
Convert everything in the visual page to dropdowns.
Matthias Clasen [Sat, 14 Dec 2019 03:50:14 +0000 (22:50 -0500)]
inspector: Use a dropdown for size groups
Use a GtkDropDown for the modes of size groups.
Matthias Clasen [Sat, 14 Dec 2019 03:33:13 +0000 (22:33 -0500)]
inspector: Use a dropdown for controllers
Use a GtkDropDown for the phases of event controllers.
Matthias Clasen [Sat, 14 Dec 2019 03:12:15 +0000 (22:12 -0500)]
inspector: Use a dropdown for attribute mapping
Use a GtkDropDown for the attribute mapping editor.
Matthias Clasen [Fri, 13 Dec 2019 21:19:53 +0000 (16:19 -0500)]
inspector: Use dropdowns in property editor
Replace combo boxes by dropdowns in the property editor.
Matthias Clasen [Sun, 22 Dec 2019 02:06:50 +0000 (21:06 -0500)]
filechooser: Use a dropdown for choices
Matthias Clasen [Sun, 22 Dec 2019 01:12:11 +0000 (20:12 -0500)]
filechooser: Use a dropdown for the filter combo
Replace an internal use of GtkComboBox with GtkDropDown.
Matthias Clasen [Mon, 9 Dec 2019 01:22:06 +0000 (20:22 -0500)]
Add GtkDropDown
This is a simple drop down control using list models.
Benjamin Otte [Sun, 24 May 2020 22:07:07 +0000 (00:07 +0200)]
xxx: isnanf() is some wtf
Matthias Clasen [Mon, 23 Dec 2019 23:23:59 +0000 (18:23 -0500)]
builderlistitemfactory: Precompile the xml
This is the one place where we can really take advantage
of precompiling, since we instantiate this template
over and over.
Matthias Clasen [Sat, 30 May 2020 18:50:22 +0000 (14:50 -0400)]
gtk-demo: Use single-click-activate for minesweeper
The explanation say we do, so do it.
Matthias Clasen [Mon, 23 Dec 2019 20:22:35 +0000 (15:22 -0500)]
Spread single-click-activate api
This makes sense to have in all the views,
not just GtkListView.
Matthias Clasen [Fri, 29 May 2020 20:10:34 +0000 (16:10 -0400)]
docs: Add a listview overview section
Add a conceptual overview for all the listmodel-based
widgets.
Fixes: #2214
Matthias Clasen [Mon, 16 Dec 2019 04:48:34 +0000 (23:48 -0500)]
gtk-demo: Add filtering to the settings demo
A demo of filtering with lists was missing so far.
Matthias Clasen [Sat, 14 Dec 2019 16:53:24 +0000 (11:53 -0500)]
gtk-demo: Demo columnview sorting
Enhance the settings demo to have a sortable column.
Matthias Clasen [Fri, 29 May 2020 17:25:36 +0000 (13:25 -0400)]
gtk-demo: Cosmetic improvements to the listview demos
Set default sizes, window titles and add more
detail to the descriptions.
Matthias Clasen [Wed, 18 Dec 2019 21:58:10 +0000 (16:58 -0500)]
gtk-builder-tool: Minimally validate <binding>
Check that the toplevel property name is legit.
Benjamin Otte [Wed, 18 Dec 2019 04:39:04 +0000 (05:39 +0100)]
testsuite: Add tests for GtkTreeListSorter
Matthias Clasen [Sun, 8 Dec 2019 22:34:10 +0000 (17:34 -0500)]
Add GtkTreeListRowSorter
This is a special-purpose sorter that can
apply the sorting of another sorter to the
levels of a GtkTreeListModel.
Benjamin Otte [Tue, 17 Dec 2019 14:35:24 +0000 (15:35 +0100)]
testcolumnview: Add sorters
Matthias Clasen [Wed, 4 Dec 2019 13:52:12 +0000 (08:52 -0500)]
column view title: Show sort indicators
Matthias Clasen [Wed, 4 Dec 2019 02:31:57 +0000 (21:31 -0500)]
columnview: Add a sort-by api
Matthias Clasen [Wed, 4 Dec 2019 13:13:13 +0000 (08:13 -0500)]
columnview: Add sorting
This is a somewhat large commit that:
- Adds GtkColumnViewSorter
This is a special-purpose, private sorter implementation which sorts
according to multiple sorters, allowing each individual sorter to be
inverted. This will be used with clickable column view headers.
- Adds a read-only GtkColumnView::sorter property
The GtkColumnView creates a GtkColumnViewSorter at startup that it uses
for this property.
- Adds a writable GtkColumnViewColumn::sorter property
This allows defining per-column sorters. Whenever an application sets a
sorter for a column, the header becomes clickable and whenever
a header is clicked, that column's sorter is prepended to the list of
sorters, unless it is already the first sorter, in which case we invert
its order. No column can be in the list more than once.
Matthias Clasen [Sat, 14 Dec 2019 01:57:57 +0000 (20:57 -0500)]
listview: Add single-click-activate
Add a single-click-activate property to GtkListView.
Matthias Clasen [Sat, 14 Dec 2019 01:56:32 +0000 (20:56 -0500)]
listitemwidget: Add single-click-activate
Add a mode to GtkListItemWidget that activates on
single click and selects on hover. Make
GtkListItemManager set this on its items
when its own 'property' of the same name is set.
Matthias Clasen [Fri, 13 Dec 2019 19:03:20 +0000 (14:03 -0500)]
builder-tool: Pass through CDATA where it makes sense
This avoids a ton of escaping for
GtkBuilderListItemFactory::bytes.
Matthias Clasen [Fri, 13 Dec 2019 03:45:43 +0000 (22:45 -0500)]
docs: Reorganize list widgets in their own chapter
Benjamin Otte [Thu, 28 Nov 2019 03:00:39 +0000 (04:00 +0100)]
fontchooserwidget: Port to listmodels
The port is kind of evil, in that it stores either a PangoFontFamily or a
PangoFontFace in the list, depending on if the fontchooser is configured
to select fonts or faces.
It also does not cache the font description anymore, so more calls to
pango_font_describe() may happen.
If both of these issues turn out problematic, the fontchooser would need
to resurrect GtkDelayedFontDescription again and put objects of that
type through the model.
These changes depend on Pango 1.46's introduction of listmodels and
various new getters, so the dependency has been upgraded.
Matthias Clasen [Sat, 14 Dec 2019 20:36:34 +0000 (15:36 -0500)]
Add some tests for expression binding
In particular, test that expressios can deal with object == this.
Benjamin Otte [Thu, 28 Nov 2019 01:32:12 +0000 (02:32 +0100)]
expression: Allow passing a this object to bind()
This gives a bit more control over the arguments passed to expressions.
Benjamin Otte [Sun, 24 Nov 2019 07:07:33 +0000 (08:07 +0100)]
gtk-demo: Add a Clocks demo
This demo is meant to showcase expressions.
It also needs the fixes in glib 2.64 to work properly.
Benjamin Otte [Tue, 26 Nov 2019 05:09:20 +0000 (06:09 +0100)]
xxx: Add a hack to make paintables transform to/from objects
See also: https://gitlab.gnome.org/GNOME/glib/merge_requests/1251
Benjamin Otte [Sat, 9 Nov 2019 00:13:28 +0000 (01:13 +0100)]
inspector: Remove private struct for prop editor
Benjamin Otte [Fri, 8 Nov 2019 23:43:41 +0000 (00:43 +0100)]
inspector: Make Controller page a GtkWidget
Benjamin Otte [Fri, 8 Nov 2019 23:36:59 +0000 (00:36 +0100)]
inspector: Remove private struct from controllers
Benjamin Otte [Fri, 8 Nov 2019 20:23:03 +0000 (21:23 +0100)]
columnview: Add header
This uses a custom GtkColumnViewTitle widget. So far that widget is
pretty boring, but that will change once we added
resizing, reordering, dnd, sorting, hiding/showing of columns or
whatever UIs we want.